import javax.swing.ImageIcon;
import javax.swing.table.AbstractTableModel;


public class ShareTableModel extends AbstractTableModel{
/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

private String columnNames[] = { "Nazwa pliku", "Rozmiar"};
	
	private Object data [][];
	
	public ShareTableModel() {
		data = new String[100][2];
		data[0][0] = "brak plikow";
		data[0][1] = "nacisnij dodaj aby dodac nowy";
	}
	
	public Object[][] getData() {
		return data;
	}

	@Override
	public int getColumnCount() {
		return columnNames.length;
	}

	@Override
	public int getRowCount() {
		return data.length;
	}
	
	public String getColumnName(int col) {
        return columnNames[col];
    }

	@Override
    public Object getValueAt(int row, int col) {
        return data[row][col];
    }
	
	public Class getColumnClass(int c) {
        return getValueAt(0, c).getClass();
    }
	
	public void setData(Object[][] d){
		data = d;
	}

}
